package com.ropeok.service.impl;

import com.ropeok.dao.RoleDao;
import com.ropeok.entity.Role;
import com.ropeok.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @BelongsProject: task2
 * @BelongsPackage: com.ropeok.service
 * @Author: zhofeifan
 * @CreateTime: 2022-08-23  14:44
 * @Description: TODO
 * @Version: 1.0
 */
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleDao roleDao;
    @Override
    public Role findRoleById(long id) {
       Role role =  roleDao.getRoleById(id);
       return  role;
    }

    @Override
    public List<Role> getRoleList() {
        return roleDao.getRoleList();
    }

    @Override
    public int addRole(Role role) {
        return roleDao.addRole(role);
    }

}
